<template>
  <div>
    <h2>小零件测试page</h2>
    <anchor ctitle='cccppp' :def='false'>这里是副标题</anchor>
    <p>留言列表组件</p>
    <p>store信息:{{$store.state.userInfo.age}}</p>
    <button @click="handleStore">headStore</button>
    <cascader></cascader>
  </div>
</template>

<script>
import anchor from '../components/tool/anchor'
import mTable from '../components/table/table'
import cascader from '../components/cascader/cascader'

import {Config, api} from '../utils/utils'
import base from '../utils/total'
import ccc from '../utils/ccc'
export default {
  name: 'tow',
  components: {
    anchor,
    mTable,
    cascader
  },
  data() {
    return {
      title: '小零件测试page',
      leaveMsg: {
        userName: '',
        message: '',
        list: []
      }
    }
  },
  methods: {
    handleSend() {
      this.list.push({
        name: this.userName,
        message: this.message
      });
      this.message = '' ;
    },
    handleStore() {
      // this.$store.state.userInfo.age += 1;
      // this.$store.commit('addAge', 5);
      // this.$store.dispatch('addAge');
      //异步调用
      this.$store.dispatch('asyncMode').then(() => {
        console.log(this.$store.state.userInfo.age);
      })
    }
  },
  mounted() {
    // console.log(base)
    // console.log(Config + '---' + api)
    // console.log(ccc)

    let storeList = this.$store.getters.getList;
    console.log(storeList)
  }

}
</script>

<style lang="less" scoped>
  
</style>